{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "a1c00a8c",
   "metadata": {},
   "source": [
    "# ExpressionFactorGraph \n",
    "\n",
    "## Overview\n",
    "\n",
    "The `ExpressionFactorGraph` class in GTSAM is a specialized factor graph designed to work with expressions. It extends the capabilities of a standard factor graph by allowing factors created from [GTSAM expressions](../../../doc/expressions.md), that implement automatic differentiation. It creates [ExpressionFactors](ExpressionFactor.ipynb).\n",
    "\n",
    "### Adding Expression Factors\n",
    "\n",
    "use **addExpressionFactor**: This method allows the user to add a new factor to the graph based on a symbolic expression. The expression defines the relationship between the variables involved in the factor.\n",
    "```c++\n",
    "  template<typename T>\n",
    "  void addExpressionFactor(const Expression<T>& h, const T& z,\n",
    "      const SharedNoiseModel& R) {\n",
    "    using F = ExpressionFactor<T>;\n",
    "    push_back(std::allocate_shared<F>(Eigen::aligned_allocator<F>(), R, z, h));\n",
    "  }\n",
    "```"
   ]
  }
 ],
 "metadata": {
  "language_info": {
   "name": "python"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
